import dva from 'dva';
import './index.css';
import { message } from 'antd'
import { browserHistory} from 'dva/router'

// 1. Initialize
const app = dva({
  history: browserHistory,
  onError (error) {
    message.error(error.message)
  },
});

// 2. Plugins
// app.use({});

// 3. Model
app.model(require('./models/app'));
app.model(require('./models/user'));
app.model(require('./models/home'));

// 4. Router
app.router(require('./router'));

// 5. Start
app.start('#root');
